package com.ithuameng.admin.app.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ithuameng.admin.enums.SequenceType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 流水号规则
 *
 * @author ithuameng
 */
@Data
@TableName("t_seq_rule")
@EqualsAndHashCode(callSuper = false)
public class SequenceRule extends Admin<Long> {

    private static final long serialVersionUID = -3715946606337731989L;

    public static final String TYPE = "type";

    public static final String NAME = "name";

    public static final String PREFIX = "prefix";

    public static final String PATTERN = "pattern";

    public static final String LENGTH = "length";

    public static final Long ADMIN_ID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 类型
     */
    private SequenceType type;

    /**
     * 角色名称
     */
    private String name;

    /**
     * 前缀
     */
    private String prefix;

    /**
     * 前端部分值
     */
    private String pattern;

    /**
     * 长度
     */
    private Integer length;
}
